﻿@model sipfe.model.dataAccess.SIPMaePersona
 @{    
    string swAux = ViewBag.swReg;
}
<fieldset style="width: 760px;">
    <legend><span>Datos de la Persona Natural</span></legend>
    <table>
            <tr>                
                <td>
                    <table>
                        <tr>
                            <td>País Emisor</td>
                            <td>Tipo documento</td>
                            <td>Número documento</td>                            
                            <td>Fecha Nacimiento</td>
                            <td>Género</td>
                        </tr>
                        <tr>
                            <td><input type="text" value="@Model.SIPDetCompendio1.vNomCorto"/></td>
                            <td><input type="text" value="@Model.SIPDetCompendio2.vNomCorto"/></td>
                            <td><input type="text" value="@Model.vNumDocum"/></td>
                            <td><input type="text" value="@String.Format("{0:dd/MM/yyyy}", Model.dtFecNacim)"/></td>
                            <td><input type="text" value="@Model.SIPDetCompendio.vNomCorto"/></td>
                        </tr>
                        <tr>
                            <td>Primer nombre</td>
                            <td>Segundo nombre</td>
                            <td>Apellido paterno</td>
                            <td>Apellido materno</td>
                            <td>Estado civil</td>
                        </tr>
                        <tr>
                            <td><input type="text" value="@Model.vPriNombre"/></td>
                            <td><input type="text" value="@Model.vSegNombre"/></td>
                            <td><input type="text" value="@Model.vPriApellido"/></td>
                            <td><input type="text" value="@Model.vSegApellido"/></td>
                            <td><input type="text" value="@Model.SIPDetEstadoCivil.Where(s => (s.dFecFinVig == null ? DateTime.Now : s.dFecFinVig) >= DateTime.Now && s.dFecIniVig <= DateTime.Now).FirstOrDefault().SIPDetCompendio.vNomCorto"/></td>
                        </tr>
                        <tr>
                            <td>País nacimiento</td>
                            <td>Región nacimiento</td>
                            <td colspan="3" rowspan="2">
                                <table style="width:310px;">
                                    <tr>
                                        <td>Provincia</td>
                                        <td>Distrito</td>
                                    </tr>
                                    <tr>
                                        <td><input type="text" value="@(Model.SIPDetCompendio6 != null ? Model.SIPDetCompendio6.vNomCorto : "- - -")" /></td>
                                        <td><input type="text" value="@(Model.SIPDetCompendio7 != null ? Model.SIPDetCompendio7.vNomCorto : "- - -")"/></td>
                                    </tr>
                                </table>
                            </td>                           
                        </tr>
                        <tr>
                            <td><input type="text"  value="@(Model.SIPDetCompendio4 != null ? Model.SIPDetCompendio4.vNomCorto : "- - -")" /></td>
                            <td><input type="text" value="@(Model.SIPDetCompendio5 != null ? Model.SIPDetCompendio5.vNomCorto : "- - -")" /></td>
                        </tr>                        
                        <tr>
                            <td>
                                <table>
                                    <tr>
                                        <td>Prefijo1</td>
                                        <td>&nbsp;</td>
                                        <td>Teléfono1</td>
                                    </tr>
                                    <tr>
                                        <td>@Html.TextBoxFor(model => model.SIPDetTelefono1.vPrefijo, new { style = "width:40px;", maxlength = 6, onblur = "javascript:onBlurUpper(this);" })</td>
                                        <td>-</td>
                                        <td>@Html.TextBoxFor(model => model.SIPDetTelefono1.vNumTel, new { style = "width:80px;", maxlength = 20 , onblur = "javascript:onBlurUpper(this);"})</td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <table>
                                    <tr>
                                        <td>Prefijo2</td>
                                        <td>&nbsp;</td>
                                        <td>Teléfono2</td>
                                    </tr>
                                    <tr>
                                        <td>@Html.TextBoxFor(model => model.SIPDetTelefono2.vPrefijo, new { style = "width:40px;", maxlength = 6, onblur = "javascript:onBlurUpper(this);" })</td>
                                        <td>-</td>
                                        <td>@Html.TextBoxFor(model => model.SIPDetTelefono2.vNumTel, new { style = "width:80px;", maxlength = 20, onblur = "javascript:onBlurUpper(this);" })</td>
                                    </tr>
                                </table>
                            </td>
                            <td colspan="2">
                                <table>
                                    <tr>
                                        <td>Correo electrónico</td>
                                    </tr>
                                    <tr>
                                        <td>@Html.TextBoxFor(model => model.SIPDetCorreo1.vCorreo, new { style = "width:275px;text-transform:none;", maxlength = 145 })</td>                                       
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
         @if (swAux.Equals("1") || swAux.Equals("2"))
        {      
        <tr>
            <td style="height:30px;">
                <a onclick="javascript:seleccionarPersonaSw(this,'@swAux','@Model.nIdePersona','@Model.vPriNombre @Model.vPriApellido @Model.vSegApellido','@Model.nIdeCodPaisDoc','@Model.nIdeTipoDocum','@Model.vNumDocum');" >Seleccionar Empresa</a>
            </td>
        </tr>
       }
    </table>    
</fieldset>   
